Clover coverage report - Prayer Portlets - 0.1-rc4-SNAPSHOT
Coverage timestamp: Thu Aug 19 2004 18:34:34 EDT
file stats: LOC: 115   Methods: 12
NCLOC: 59   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
PrayerComment.java 75% 86.4% 83.3% 83.3%
coverage coverage
 1   
 /*
 2   
  * Created on Jul 26, 2004
 3   
  */
 4   
 package org.marketchangers.prayer;
 5   
 
 6   
 import java.util.Date;
 7   
 
 8   
 /**
 9   
  * @author Jason Williams
 10   
  * @hibernate.class  table="PrayerComments"
 11   
  */
 12   
 public class PrayerComment extends PersistentObject {
 13   
 
 14   
     private PrayerRequest parentRequest;
 15   
     private Date postDate;
 16   
     private String authorUserId;
 17   
     private String content;
 18   
 
 19   
     /**
 20   
      * @hibernate.property
 21   
      * @return
 22   
      */
 23  8
     public String getContent() {
 24  8
         return content;
 25   
     }
 26   
 
 27   
     /**
 28   
      * @hibernate.timestamp
 29   
      * @return
 30   
      */
 31  0
     public Date getPostDate() {
 32  0
         return postDate;
 33   
     }
 34   
 
 35   
     /**
 36   
      * @param string
 37   
      */
 38  8
     public void setContent(String string) {
 39  8
         content = string;
 40   
     }
 41   
 
 42   
     /**
 43   
      * @param date
 44   
      */
 45  8
     public void setPostDate(Date date) {
 46  8
         postDate = date;
 47   
     }
 48   
 
 49   
     /**
 50   
      * @hibernate.property
 51   
      * @return
 52   
      */
 53  8
     public String getAuthorUserId() {
 54  8
         return authorUserId;
 55   
     }
 56   
 
 57   
     /**
 58   
      * @hibernate.many-to-one
 59   
      *             class="org.marketchangers.prayer.PrayerRequest"
 60   
      * @return
 61   
      */
 62  0
     public PrayerRequest getParentRequest() {
 63  0
         return parentRequest;
 64   
     }
 65   
 
 66   
     /**
 67   
      * @param string
 68   
      */
 69  10
     public void setAuthorUserId(String string) {
 70  10
         authorUserId = string;
 71   
     }
 72   
 
 73   
     /**
 74   
      * @param request
 75   
      */
 76  10
     public void setParentRequest(PrayerRequest request) {
 77  10
         parentRequest = request;
 78   
     }
 79   
 
 80  10
     public boolean equals(Object o) {
 81  10
         if (o == this) {
 82  4
             return true;
 83   
         }
 84   
 
 85  6
         if (!(o instanceof PrayerComment)) {
 86  0
             return false;
 87   
         }
 88   
 
 89  6
         PrayerComment other = (PrayerComment)o;
 90  6
         return equals(this.authorUserId, other.authorUserId)
 91   
             && equals(this.content, other.content)
 92   
             && equals(this.postDate, other.postDate)
 93   
             && equals(this.parentRequest, other.parentRequest);
 94   
     }
 95   
 
 96  24
     private boolean equals(Object lhs, Object rhs) {
 97  24
         return lhs == null ? rhs == null : lhs.equals(rhs);
 98   
     }
 99   
 
 100  2
     public int hashCode() {
 101  2
         int result = 10;
 102  2
         result = result * 37 + hashCode(authorUserId);
 103  2
         result = result * 37 + hashCode(content);
 104  2
         result = result * 37 + hashCode(postDate);
 105  2
         result = result * 37 + hashCode(parentRequest);
 106   
 
 107  2
         return result;
 108   
     }
 109   
 
 110  8
     private int hashCode(Object o) {
 111  8
         return o == null ? 0 : o.hashCode();
 112   
     }
 113   
 
 114   
 }
 115